home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / ab20 / unarced / utilities / system / intuition / shadow / examples / readme < prev    next >
Encoding:
Text File  |  1995-03-17  |  4.9 KB  |  126 lines

  1.  
  2. README for SHADOW distribution Version 4.3.  Dated: 01 Feb 1992
  3.  
  4.  
  5. There are three separate example programs included here, with one file
  6. (Gui/gui.c) shared by both Browser/Browser and SWRI/Control.
  7.  
  8.  
  9. Test/PerfTest:
  10.  
  11. The Test/PerfTest allows you to test various speeds of some of SHADOWs
  12. capabilities.  For instance, its semaphoring speed, and its AVL tree
  13. handling.  You might note that these numbers are similar, implying that
  14. the overhead of the semaphoring routine is the bottleneck.  You would
  15. be right -- the semaphore routines could be improved somewhat.
  16.  
  17. Here is an example run of this program:
  18.    1.Work:JazzBench/Kernel/Examples/Test> PerfTest ?
  19.  
  20.    Okay, this is how you want to run this program:
  21.            PerfTest MEMORY/S,METHOD/S,TEST/S,AVL/S,SEMAPHORE/S,STRING/S
  22.  
  23.    1.Work:JazzBench/Kernel/Examples/Test> PerfTest SEMAPHORE AVL
  24.    Beginning SHADOW AVLTree speed test of FindBinNode:
  25.    SHADOW AVLTree speed test completed.
  26.            8476 SHADOW AVLTree FindBinNode()/second
  27.  
  28.    Beginning SHADOW AVLTree speed test Add/Remove:
  29.    SHADOW AVLTree speed test completed.
  30.            2794 SHADOW AVLTree Adds-Removes/second
  31.  
  32.    Beginning SHADOW semaphore speed test:
  33.    SHADOW semaphore test completed.
  34.            8695 SHADOW semaphore Psem()-VSem()/second
  35.  
  36.    Attempting to purge SHADOW and PPIPC libraries.
  37.  
  38.  
  39. Browser/Browser:   <-- you want topaz 11 in fonts: !!!
  40.  
  41. The browser is a pretty advanced program which allows you to get a
  42. run-time updated view of all classes and objects in the system.  It
  43. allows you to view all instances on class lists, all methods, all
  44. arguments for a method, and all attributes.
  45.  
  46. In addition, as classes are created and destroyed, the Browser program's
  47. displays are updated automatically.  The same is true for the number of
  48. patches which are located in the Method display window.
  49.  
  50. To see this, run the Browser:
  51.       Shell Prompt 1> run Browser
  52.  
  53. Now select the MetaClass name in the scrolling list.  You should see
  54. the information updated below to show that you have selected the Meta
  55. properly.  Now hit the Instances button.  Another window will open,
  56. showing you a list of all the classes that exist in SHADOW at that time.
  57.  
  58. Move that window elsewhere -- the upper right hand corner of the screen is
  59. best.  Go back to the shell, and:
  60.       [Ouput from Browser removed]
  61.       Shell Prompt 1> cd /SWRI
  62.       Shell Prompt 1> execute script
  63.  
  64. You will see several more windows open, and most interestingly, the list
  65. of classes in the Browser has gotten longer!
  66.  
  67. Now find the Meta listing again, and this time select MetaCluster, and
  68. then hit the Instances button.  The new window will display two clusters.
  69. Select the 'SWRI NDE Control Cluster' cluster and hit the Methods button.
  70. Now select the only Method listed.
  71.  
  72. The patch number should say '2'.  The two patches were created by the
  73. filter and by the outputfilter programs.  Now find the SWRI window with
  74. the large QUIT button, and hit that button, watching the Patches number.
  75.  
  76. You should see that number fall to zero.  In addition, the Class listing
  77. should get shorter as well as the Cluster listing.
  78.  
  79. But Wait!  We're looking at a METHOD in the "SWRI NDE Control Cluster",
  80. right?  And it's gone???  Wrong.  If you type 'status' in your shell,
  81. you'll see that the Control program is still running, and it will
  82. continue to exist as long as you have a pointer to a class where one
  83. of its methods refers to that program.  Close the Method Window, do a
  84. 'status' again, and Control should be gone!  The joys of resource tracking
  85. folks!
  86.  
  87. That gives you an idea about the browser.  Feel free to abuse it and send
  88. me bug reports!
  89.  
  90.  
  91. SWRI/lotsOfProgram:  <--- topaz 11 in fonts: !!!
  92.  
  93. Use the script to start everything up.  You should notice several things.
  94. First, the program doesn't do anything terribly useful :).
  95.  
  96. But seriously, try running 'outputfilter' after starting up the script.
  97. You'll notice that although another outputFilter window starts up, the
  98. new process exits.  That's because it automatically detects that the
  99. program is already running, and merely instantiates itself again.
  100.  
  101. In addition, sending a ^C to any of the program quits the programs --
  102. all of the instances of those programs, in fact.  And sending a ^C to the
  103. Control program shuts the entire system down.
  104.  
  105. So what does this thing do?
  106.  
  107. Well, Input creates a bunch of random data, sticks it onto a composite,
  108. and sends the composite a method.
  109.  
  110. Filter Patches that method during startup.  When it receives the method,
  111. it takes the composite, copies the data into a new object on the
  112. composite, and smooths out the data in the new object.
  113.  
  114. OutputFilter Patches the method during startup as well.  When it receives
  115. the method, it finds this modified data and displays it.
  116.  
  117. Output Patches the method too.  When it receives the method, it finds the
  118. unmodified data and displays it.
  119.  
  120. Not too interesting, but displays co-operating processes, etc. etc.
  121.  
  122.  
  123. Gui/gui.c:
  124.  
  125. File included for both SWRI/Control and Browser/Browser.
  126.